package com.lhy.wanandroid.ui.main.home

import androidx.lifecycle.MutableLiveData
import com.lhy.wanandroid.base.BaseViewModel
import com.xiaojianjun.wanandroid.model.bean.Banner

class HomeVM:BaseViewModel() {

    val bannerDataList=MutableLiveData<List<Banner>>()

    private val homeRepository=HomeRepository()

    fun getBannerList(){
        launchOnMain(
                block = {
                    val result=homeRepository.getBannerList()
                    bannerDataList.value=result
                }
        )
    }

}